import API from "../../https/api";

const state = {
  projectId: "1",
  projectList: [
    {
      name: "项目1",
      id: "1"
    },
    {
      name: "项目2",
      id: "2"
    },
    {
      name: "项目3",
      id: "3"
    },
    {
      name: "项目4",
      id: "4"
    }
  ],
  systemFlag: false,
  addUserFlag: false
};

const mutations = {
  projectIdFn: (state, projectId) => {
    state.projectId = projectId;
  },
  projectList: (state, projectList) => {
    state.projectList = projectList;
  },
  systemFlagFn: (state, flag) => {
    state.systemFlag = flag;
  },
  addUserFlagFn: (state, flag) => {
    state.addUserFlag = flag;
  }
};

const actions = {};

export default {
  namespaced: true,
  state,
  mutations,
  actions
};
